/*
 * File Name: ProtoUtil.h
 *
 * Created on: 2021-01-28
 * Author: glendy ganby@163.com
 *
 * Last Modified: 2021-01-28
 * Description:
 */

#ifndef _PROTOUTIL_H_
#define _PROTOUTIL_H_

#include <string>
#include <stdint.h>

namespace miniproto
{

extern const ::std::string EMPTY_STRING;

extern bool is_array_field(const uint8_t field_type);
extern uint8_t base_field_type(const uint8_t field_type);
extern uint32_t wire_tag(const uint32_t number, const int32_t wire_type);
extern void wire_tag_split(const uint32_t tag, uint32_t *number, int32_t *wire_type);
extern int uint32_byte_size(const uint32_t val);

} // namespace miniproto

#endif //_PROTOUTIL_H_
